﻿#pragma once
#include "afxdialogex.h"
#include "Receive.h"
#include "ReceivePicture.h"


// CTeskDialog 对话框

/**
* @ brief 对话框主界面
* @ 控制Hook、UnHook、显示内容、设置路径登功能
*/
class CTeskDialog : public CDialogEx
{
	DECLARE_DYNAMIC(CTeskDialog)

public:
	CTeskDialog(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CTeskDialog();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG1 };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持


	DECLARE_MESSAGE_MAP()

public:
	//本对话框指针
	static CTeskDialog* m_TeskDialog;
	/**
	* @ breif 接收消息回调
	* @ param pInfo		消息结构参数
	*/
	void GetRecvMsg(pRecvMsg pInfo);
	/**
	* @ breif 接收图片回调
	* @ param pInfo		消息结构参数
	*/
	void GetRecvPicture(pRecvMsg pInfo);
protected:
	//Hook接收消息
	CReceive m_Receive;
	//Hook接收图片信息
	CReceivePicture m_ReceivePicture;
	//记录图片消息，用于关联图片内容信息
	std::vector<RecvMsg> m_vRecvMsg;
public:
	//hook按钮对象
	CButton m_hookRevieMsg;
	//unhook按钮对象
	CButton m_unhookRevieMsg;
	//输入框对象，显示接收的内容信息
	CEdit m_editRevieMsg;
	//显示图片
	CStatic m_revPicture;
	//显示接收路径
	CEdit m_revPicPath;
	//Hook接收信息
	afx_msg void OnBnClickedButton1();
	//UnHook接收信息
	afx_msg void OnBnClickedButton2();
	//设置接收图片路径
	afx_msg void OnBnClickedButton3();
	//对话框初始化
	virtual BOOL OnInitDialog();
};
